const path = require('path')
const isDev = process.env.NODE_ENV === 'development'

module.exports = {
  // publicPath: isDev ? '' : '/hyy-vue3-mindmap/',
  outputDir: './dist', // 打包dist所在路径
  lintOnSave: false,
  productionSourceMap: false,
  transpileDependencies: ['simple-mind-map'],
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, './src/')
      }
    }
  }, 
  devServer: {
    proxy: {
      '/api': {
        target: 'http://47.121.27.242:3389/', // 设置代理目标
        changeOrigin: true, // 是否改变请求源地址
        pathRewrite: { '^/api': '' } // 将 /api 替换为空字符串
      }
    }
  }
}
